﻿
@{
    ViewData["Title"] = "AddDevice";
    Layout = "~/Views/Home/Main.cshtml";
}

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Demo</title>
    <link href="/layui/css/layui.css" rel="stylesheet">
</head>
<body>
    <h3>车间管理/车间列表/添加</h3>
    <div class="parent-container">
        <h2>基本信息</h2>
    </div>
    <div class="parent-container">
        <form class="layui-form">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">设备编号：</label>
                    <div class="layui-input-inline" style="width: 200px;">
                        <input type="text" name="DeviceNumber" required lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">设备名称：</label>
                    <div class="layui-input-block" style="width: 200px;">
                        <input type="text" name="DeviceName" required lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">设备类型：</label>
                    <div class="layui-input-inline" style="width: 200px;">
                        <select name="DeviceType" required lay-verify="required" lay-search>
                            <option value="">请选择类型</option>
                            <option value="类型一">类型一</option>
                            <option value="类型二">类型二</option>
                            <option value="类型三">类型三</option>
                            <option value="类型四">类型四</option>
                            <option value="类型五">类型五</option>
                            <option value="类型六">类型六</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">状态：</label>
                    <div class="layui-input-block" style="width: 200px;">
                        <input type="radio" name="DeviceState" value="true" title="正常" checked>
                        <input type="radio" name="DeviceState" value="false" title="异常">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">所在生产线：</label>
                    <div class="layui-input-inline" style="width: 200px;">
                        <select name="ProductionLine" required lay-verify="required" lay-search>
                            <option value="">请选择生产线</option>
                            <option value="一号生产线">一号生产线</option>
                            <option value="一号生产线">二号生产线</option>
                            <option value="三号生产线">三号生产线</option>
                            <option value="四号生产线">四号生产线</option>
                            <option value="五号生产线">五号生产线</option>
                            <option value="六号生产线">六号生产线</option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">采购日期：</label>
                    <div class="layui-input-block" style="width: 200px;">
                        <input type="text" name="PurchaseDate" class="layui-input" id="ID-laydate-demo" placeholder="yyyy-MM-dd">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">添加人：</label>
                    <div class="layui-input-inline" style="width: 200px;">
                        <input type="text" name="AddPeople" required lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">添加日期：</label>
                    <div class="layui-input-block" style="width: 200px;">
                        <input type="text" name="AddDate" class="layui-input" id="ID-laydate-demo" placeholder="yyyy-MM-dd">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">设备图片：</label>
                    <div class="layui-input-inline" style="width: 400px;">
                        <button type="button" class="layui-btn" id="ID-upload-demo-btn-2">
                            <i class="layui-icon layui-icon-upload"></i> 多图片上传
                        </button>
                        <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 11px;">
                            预览图：
                            <div class="layui-upload-list" id="upload-demo-preview"></div>
                        </blockquote>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block" style="float:right">
                    <button type="reset" class="layui-btn layui-btn-primary" id="Entry">取消</button>
                    <button class="layui-btn" lay-submit lay-filter="formDemo">提交</button>
                </div>
            </div>
        </form>
    </div>
    <!-- 在某个元素中嵌入 ApiUrl -->
    <div id="apiUrl" data-url="@Model.ApiUrl"></div>
    <style>
        .parent-container {
            /* 确保父容器有足够的宽度，并且设置了文本对齐方式 */
            width: 80%; /* 或者您想要的任何宽度 */
            margin: 0 auto; /* 如果父容器本身也需要居中，可以使用这个属性（对于本例不是必需的） */
            text-align: center; /* 使子元素（如h3）在父容器内水平居中 */
            /* 其他样式，如背景颜色、内边距等 */
            padding: 20px; /* 内边距 */
        }
    </style>
    <script src="~/js/m_shopmachine/adddevice.js?n=" + new Date()></script>
</body>
</html>